function log(target: any, propertyKey: string, descriptor: PropertyDescriptor){
    const originalMethod = descriptor.value
    descriptor.value = function (...args) {
        console.log('calling', propertyKey, args, target)
        const result = originalMethod.apply(this, args)
        console.log('result', result)
        return result
    }
}
class Calculator{
    @log
    add(a,b){
        return a + b
    }
}
const calculator = new Calculator()
calculator.add(1,2)